﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
    assembly="JSC.Portal.Web.App" namespace="JSC.Portal.Web.App.Modules.StaticContents">

	<class name="StaticContent" table="jscm_staticcontent" lazy="false">

		<!-- start Base on every entity -->
		<id name="Id" column="staticcontentid" unsaved-value="-1">
			<generator class="native">
				<param name="sequence">jscm_staticcontent_staticcontentid_seq</param>
			</generator>
		</id>
		<!-- end Base on every entity -->

		<property name="Title" column="title"/>
		<property name="Content" column="content" type="StringClob" />
    <property name="CreatedOn" column="createdtimestamp" type="DateTime"/>
    <property name="ModifiedOn" column="modifiedtimestamp" type="DateTime"/>
    <many-to-one name="CreatedByUser" class="JSC.Portal.Entities.PortalUser, JSC.Portal.Core" column="createdby" not-null="false" not-found="ignore"/>
    <many-to-one name="ModifiedByUser" class="JSC.Portal.Entities.PortalUser, JSC.Portal.Core" column="modifiedby" not-null="false" not-found="ignore"/>
		<many-to-one name="Section" class="JSC.Portal.Entities.Section, JSC.Portal.Core" column="sectionid" not-null="false" not-found="ignore"/>
	</class>
</hibernate-mapping>